using System;
using System.Collections.Generic;
using Microsoft.SqlServer.Types;
using SinBiota.Model.Business.MapServices.Datatypes;
using SinBiota.Model.Entities;

namespace SinBiota.Model.Business.MapServices.Interfaces
{
    public interface IMapDatabaseServices
    {
        IList<SqlGeography> GetGeographyList(LatLong nwLatLong, LatLong seLatLong, int zoomLevel, StoredProcedure storedProcedure);
        IList<MapHeatPoint> GetMapHeatPoints(TileLayer tileLayer);
        IList<GeographyWithIntensity> GetGeographyWithIntensityList(LatLong nwLatLong, LatLong seLatLong, int zoomLevel, StoredProcedure storedProcedure);
        void StoreTileImage(string layerkey, string quadkey, byte[] imageData);
        byte[] RetrieveTileImage(string layerkey, string quadkey);
        bool TileExists(string layerkey, string quadkey);
        void BulkStoreTileImages(string layerkey, IDictionary<string, byte[]> quadkeyToimage);
        IList<string> RetrieveExistingLayerQuadkeys(string layerkey);

        // occurrences:
        void IncludeOccurrencesInSpatialDatabase(IEnumerable<Occurrence> occurrences);
        IList<LatLongWithId> GetOccurrencesInSquare(LatLong nw, LatLong se);
        IList<LatLongWithId> GetOccurrencesByTaxon(string taxon);
        void InitOccurrenceSpatialDatabase();
    }
}